package com.controller;

import com.service.WxLoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@CrossOrigin("*")
@RestController
@RequestMapping("/api/weixin/")
public class WxController {

        @Autowired
    private WxLoginService wxLoginService;

@RequestMapping("/wxLogin")
public String wxLogin(String code,String nick,String head,String miwen,String iv){
    System.out.println("code:"+code+";nick："+nick+";head:"+head);
    String result=wxLoginService.wxLogin(code,nick,head,miwen,iv);
    System.out.println("result:"+result);
    return result;

}

}
